package com.cjm.one.webmanager.service.goods.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cjm.one.goods.client.GoodsCommentClient;
import com.cjm.one.model.goods.entity.GoodsComment;
import com.cjm.one.model.goods.vo.GoodsCommentVo;
import com.cjm.one.webmanager.service.goods.GoodsCommentService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

@Service
public class GoodsCommentImpl implements GoodsCommentService {
    @Resource
    private GoodsCommentClient goodsCommentClient;
    @Override
    public Page<GoodsComment> getListByCondition(Long current, Long size, String text, Long userId, Long goodsId) {
        return goodsCommentClient.list(current,size,text,userId,goodsId).getData();
    }

    @Override
    public GoodsCommentVo getVoById(Long id) {
        return goodsCommentClient.get(id).getData();
    }

    @Override
    public Boolean deleteById(Long id) {
        return goodsCommentClient.delete(id).getData();
    }
}
